﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using QxFramework.Core;
using QxFramework.Utilities;

public class ProcedureManager_New : MonoSingleton<ProcedureManager_New>
{
    //public string _currentProcedure;
    public IProcedure currentProcedure;
    public StartProcedure startProcedure;
    public MainProcedure mainProcedure;
    public void Start()
    {
        startProcedure = new StartProcedure();
        mainProcedure = new MainProcedure();
        currentProcedure = startProcedure;
        DontDestroyOnLoad(this);
    }

    public void Update()
    {
        //_currentProcedure = currentProcedure.ToString();
    }
    public void ChangeProcedure(IProcedure pro)
    {
        currentProcedure.OnExit();
        if (currentProcedure != pro)
        {
            currentProcedure = pro;
        }
        currentProcedure.OnEnter();

    }
}
